<template>
  <el-dialog
    :title="`${injectData.name}历史记录`"
    :visible.sync="dialogVisible"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :before-close="handleClose"
    :width="dialogWidth"
    append-to-body
    class="log"
  >
    <div class="log-dialog">
      <el-table
        :data="tableData"
        style="width: 100%"
        height="100%"
        border
      >
        <el-table-column prop="date" label="礼物"></el-table-column>
        <el-table-column prop="name" label="时间"></el-table-column>
        <el-table-column prop="address" label="用户昵称"></el-table-column>
        <el-table-column prop="address" label="用户ID"> </el-table-column>
      </el-table>

      <div class="log-pagination">
        <el-pagination layout="prev, pager, next" :total="10"></el-pagination>
      </div>
      
      <!-- <div slot="footer" class="dialog-footer">
        <el-button size="mini" @click="handleClose">取消</el-button>
      </div> -->
    </div>
  </el-dialog>
</template>

<script>
import { IsPC } from '@/utill/agent.js'

export default {
  name: 'log',
  data() {
    return {
      dialogVisible: true,
      tableData: [{}, {}]
    }
  },
  computed: {
    dialogWidth() {
      return IsPC() ? '70%' : '90%'
    }
  },
  props: {
    injectData: {
      type: Object,
      default: () => {}
    }
  },
  methods: {
    handleClose() {
      this.dialogVisible = false;
      this.$emit('close')
    }
  }
}
</script>